package com.ygqh.baby.model;

import com.ygqh.baby.po.YgProductPack;

import java.math.BigDecimal;

/**
 * 〈购物车信息,含促销信息〉
 *
 * @author guohao
 * @date 2019/4/29 14:33
 * @since 1.0.0
 */
public class CarPromotionWrapper {
    private ShoppingCarBasicData carBasicData;
    /**
     * 活动id
     */
    private Long promotionId;

    private BmdismLadderModel bmdism;

    private YgProductPack productPack;

    /**
     * 参与自选包的数量
     */
    private Long packAmount;
    /**
     * 自选包金额 该条明细的自选包金额
     */
    private BigDecimal packPrice;


    /**
     * 最优自选包阶梯
     */
    private BmdismLadderModel.BmdismLadder bestLadder;

    private ShoppingCarDisPrice carDisPrice;

    /**
     * 加价购与满赠的验证金额
     */
    private BigDecimal limitPrice;

    /**
     * 是否可用优惠券
     */
    private boolean userCoupon;


    public String getPromotionGroupKey() {

        return carBasicData.getSalesType() + "_" + promotionId;
    }

    public boolean isUserCoupon() {
        return userCoupon;
    }

    public void setUserCoupon(boolean userCoupon) {
        this.userCoupon = userCoupon;
    }

    public BigDecimal getLimitPrice() {
        return limitPrice;
    }

    public void setLimitPrice(BigDecimal limitPrice) {
        this.limitPrice = limitPrice;
    }

    public ShoppingCarBasicData getCarBasicData() {
        return carBasicData;
    }

    public void setCarBasicData(ShoppingCarBasicData carBasicData) {
        this.carBasicData = carBasicData;
    }

    public ShoppingCarDisPrice getCarDisPrice() {
        return carDisPrice;
    }

    public void setCarDisPrice(ShoppingCarDisPrice carDisPrice) {
        this.carDisPrice = carDisPrice;
    }

    public BmdismLadderModel.BmdismLadder getBestLadder() {
        return bestLadder;
    }

    public void setBestLadder(BmdismLadderModel.BmdismLadder bestLadder) {
        this.bestLadder = bestLadder;
    }

    public BigDecimal getPackPrice() {
        return packPrice;
    }

    public void setPackPrice(BigDecimal packPrice) {
        this.packPrice = packPrice;
    }

    public Long getPackAmount() {
        return packAmount;
    }

    public void setPackAmount(Long packAmount) {
        this.packAmount = packAmount;
    }

    public BmdismLadderModel getBmdism() {
        return bmdism;
    }

    public void setBmdism(BmdismLadderModel bmdism) {
        this.bmdism = bmdism;
    }

    public YgProductPack getProductPack() {
        return productPack;
    }

    public void setProductPack(YgProductPack productPack) {
        this.productPack = productPack;
    }

    public Long getPromotionId() {
        return promotionId;
    }

    public void setPromotionId(Long promotionId) {
        this.promotionId = promotionId;
    }

    @Override
    public CarPromotionWrapper clone() {
        try {
            return (CarPromotionWrapper) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return null;
    }
}
